<h1>Dodaj produkt</h1>
<div id="view-content">
	<div class="container">
	<?php
	$this->form->setAction($this->url(array('action' => 'add-product-post')));
	echo $this->form;
	?>
	</div>
</div>
<script>
	$(function () {
		$('#fileupload').fileupload({
			dataType: 'json',
			url: '/spletna/prodaja/upload-image',
			done: function (e, data) {
				$.each(data.result.files, function (index, file) {
					$('#base_image').attr('value', file.url.match(/media.*/g));
					$('#thumbnail').attr('value', file.thumbnailUrl.match(/media.*/g));
				});
			}
		});
	});
</script>